package com.ws;

import javax.jws.WebService;

@WebService(endpointInterface = "com.ws.EightBall")
public class EightBallImpl implements EightBall {

	static final String[] answers = { "Yes.", "Yes, in due time.", "Absolutely",
			"Go for it!", "Outlook so so.", "You can count on it",
			"Looks good to me!", "Looking good!", "A definite Yes", "Probably",
			"You will have to wait.", "Too Early to Predict", "Not Now",
			"Who knows?", "Are you kidding?", "Forget about it.",
			"Absolutely Not", "My sources say no.", "Don't bet on it.",
			"I have my doubts." };
	
	@Override
	public String ask(String question){
		
		int i = (int) (Math.random()* 9);
		return answers[i];
		
	}
}
